<form nz-form #validateForm="ngForm" (ngSubmit)="submitForm()" nzLayout="horizontal" autocomplete="off">
    <!-- 模态框头部 -->
    <div class="modal-header">
        <div class="modal-title">
            <i class="iconfont icon-medicine-box mr-sm"></i>
            <span *ngIf="entity.id">{{l('Edit')}}</span>
            <span *ngIf="!entity.id">{{l('Create')}}</span>
        </div>
    </div>
    <!-- 模态框内容 -->
    <fieldset>
        <!-- 提示信息 -->
        <!-- <nz-alert nzType="info" nzCloseable [nzShowIcon]="true" nzMessage="l('我想提示点什么内容给你说')"></nz-alert> -->
        <!-- Name : Name 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">
                {{l('StockCategoryName')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                <!--  控件位置 -->
                <input nz-input name="name" #name="ngModel" [(ngModel)]="entity.name" [placeholder]="l('StockCategoryNameInputDesc')" required>
                <!-- 校验 -->
                <nz-form-explain *ngIf="name.control.dirty &&name.control.errors">
                    <ng-container *ngIf="name.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>
                </nz-form-explain>
            </nz-form-control>
        </nz-form-item>
        <!--Name : Name 的控件范围结束=END= -->
        <!-- Status : Status 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="status">
                {{l('Status')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="4" [nzXs]="24" nzHasFeedback>
                <!--  控件位置 -->
                <nz-select name="status" #status="ngModel" [nzPlaceHolder]="l('StockCategoryStatusInputDesc')" required [(ngModel)]="entity.status">
                    <!-- 请配置你的数据源 -->
                    <nz-option *ngFor="let option of statusList" [nzValue]="option.value" [nzLabel]="option.text">
                    </nz-option>
                </nz-select>
                <!-- 校验 -->
                <nz-form-explain *ngIf="status.control.dirty&&status.control.errors">
                    <ng-container *ngIf="status.control.hasError('required')">{{l('ThisFieldIsRequired')}}
                    </ng-container>
                </nz-form-explain>
            </nz-form-control>
            <nz-form-label nz-col [nzSm]="5" [nzXs]="24" nzRequired nzFor="sort">
                {{l('Sort')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="5" [nzXs]="24" nzHasFeedback>
                <!--  控件位置 -->
                <nz-input-number name="sort" #sort="ngModel" [(ngModel)]="entity.sort" [nzMin]="0" [nzMax]="1000000" [nzStep]="1"></nz-input-number>
                <!-- 校验 -->
                <nz-form-explain *ngIf="sort.control.dirty&&sort.control.errors">
                    <ng-container *ngIf="sort.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>
                </nz-form-explain>
            </nz-form-control>
        </nz-form-item>
        <!--Status : Status 的控件范围结束=END= -->
        <!-- Sort : Sort 的控件范围=Start= -->
        <!--Sort : Sort 的控件范围结束=END= -->
        <!-- showCount : showCount 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="showCount">
                {{l('ShowCount')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <!--  控件位置 -->
                <nz-input-number name="showCount" #showCount="ngModel" [(ngModel)]="entity.showCount" [nzMin]="0" [nzMax]="1000000" [nzStep]="1"></nz-input-number>
                <span style="display: inline-block;margin-left: 5px;">
                    输入0则表示显示全部数量
                  </span>
                <!-- 校验 -->
                <nz-form-explain *ngIf="showCount.control.dirty&&showCount.control.errors">
                    <ng-container *ngIf="showCount.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>
                </nz-form-explain>
            </nz-form-control>
        </nz-form-item>
        <!--showCount : showCount 的控件范围结束=END= -->

        <!-- CollegeId : CollegeId 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="collegeId">
                {{l('CollegeName')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                <!--  控件位置 -->
                <nz-select name="collegeId" #collegeId="ngModel" [nzPlaceHolder]="l('StockCategoryCollegeIdInputDesc')" required [(ngModel)]="entity.collegeId">
                    <!-- 请配置你的数据源 -->
                    <nz-option *ngFor="let option of collegeList" [nzValue]="option.value" [nzLabel]="option.text">
                    </nz-option>
                </nz-select>

                <!-- 校验 -->
                <nz-form-explain *ngIf="collegeId.control.dirty
                                         &&collegeId.control.errors">
                    <ng-container *ngIf="collegeId.control.hasError('required')">{{l('ThisFieldIsRequired')}}
                    </ng-container>
                </nz-form-explain>
            </nz-form-control>
        </nz-form-item>
        <!--CollegeId : CollegeId 的控件范围结束=END= -->
        <!-- Description : Description 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="description">
                {{l('StockCategoryDescription')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <!--  控件位置 -->
                <input nz-input name="description" #description="ngModel" [(ngModel)]="entity.description" [placeholder]="l('StockCategoryDescriptionInputDesc')">
            </nz-form-control>
        </nz-form-item>
        <!--Description : Description 的控件范围结束=END= -->
        <!-- isInputName : isInputName 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="isInputName">
                {{l('isInputName')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="4" [nzXs]="24">
                <!--  控件位置 -->
                <nz-switch name="isInputName" #isInputName="ngModel" [(ngModel)]="entity.isInputName" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
                <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
                <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
            </nz-form-control>
            <nz-form-label [nzSm]="5" [nzXs]="24" nzFor="isUpset">
                {{l('isUpset')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="5" [nzXs]="24">
                <!--  控件位置 -->
                <nz-switch name="isUpset" #isUpset="ngModel" [(ngModel)]="entity.isUpset" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
                <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
                <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
            </nz-form-control>
        </nz-form-item>
        <!--isInputName : isInputName 的控件范围结束=END= -->
        <!-- isUpset : isUpset 的控件范围=Start= -->
        <!--isUpset : isUpset 的控件范围结束=END= -->

        <!-- isShowAnalysis : isShowAnalysis 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="isShowAnalysis">
                {{l('isShowAnalysis')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="4" [nzXs]="24">
                <!--  控件位置 -->
                <nz-switch name="isShowAnalysis" #isShowAnalysis="ngModel" [(ngModel)]="entity.isShowAnalysis" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
                <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
                <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
            </nz-form-control>
            <nz-form-label [nzSm]="5" [nzXs]="24" nzFor="isShowScore">
                {{l('isShowScore')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="5" [nzXs]="24">
                <!--  控件位置 -->
                <nz-switch name="isShowScore" #isShowScore="ngModel" [(ngModel)]="entity.isShowScore" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
                <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
                <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
            </nz-form-control>
        </nz-form-item>
        <!--isShowAnalysis : isShowAnalysis 的控件范围结束=END= -->
        <!-- isShowScore : isShowScore 的控件范围=Start= -->
        <!--isShowScore : isShowScore 的控件范围结束=END= -->

        <!-- isShowContent : isShowContent 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="isShowContent">
                {{l('isShowContent')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <!--  控件位置 -->
                <nz-switch name="isShowContent" #isShowContent="ngModel" [(ngModel)]="entity.isShowContent" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
                <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
                <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
            </nz-form-control>
        </nz-form-item>
        <!--isShowContent : isShowContent 的控件范围结束=END= -->
        <!-- ShowContent : ShowContent 的控件范围=Start= -->
        <nz-form-item nz-row>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="showContent">
                {{l('StockCategoryShowContent')}}
            </nz-form-label>
            <nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <!--  控件位置 -->
                <input nz-input name="showContent" #showContent="ngModel" [(ngModel)]="entity.showContent" [placeholder]="l('StockCategoryShowContentInputDesc')">
            </nz-form-control>
        </nz-form-item>
        <!--ShowContent : ShowContent 的控件范围结束=END= -->

    </fieldset>
    <!-- 模态框底部 -->
    <div class="modal-footer">
        <button nz-button [nzType]="'default'" type="button" (click)="close()" [disabled]="saving">
            <i class="iconfont icon-close-circle"></i> {{l("Cancel")}}
        </button>
        <button nz-button [nzType]="'primary'" type="submit" [disabled]="!validateForm.form.valid|| saving" [nzLoading]="saving">
            <i class="iconfont icon-save" *ngIf="!saving"></i> {{l("Save")}}
        </button>
    </div>
</form>